<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:c="">
<head>
    <meta charset="UTF-8">
    <title>MyPetStore</title>
    <link rel="Stylesheet" href="../css/jpetstore.css" type="text/css" media="screen"/>
</head>
<body>
<div th:replace="common/top">
</div>

<div id="Content">
    <div id="BackLink">
        <a href="/catalog/main">Return to Main Menu</a>
    </div>

    <h2>My Orders</h2>

    <table>
        <tr>
            <th>Order ID</th>
            <th>Date</th>
            <th>Total Price</th>
        </tr>
        <tr th:each="order:${orderList}">
            <td>
                <a th:href="@{'/order/viewOrder?orderId='+${order.orderId}}" th:text="${order.orderId}">账单号</a>
            </td>
            <td th:text="${#dates.format(order.orderDate,'yyyy/MM/dd')}">

            </td>
            <td th:text="${'$'+#numbers.formatDecimal(order.totalPrice,0,'COMMA',2,'POINT')}"></td>
        </tr>
    </table>
</div>

<div th:replace="common/bottom">
</div>
</body>
</html>